package ita.mock.wrapper;

import ita.mock.os.Base64ServletOutputStream;

import java.io.IOException;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;

public class Base64ResponseWrapper extends HttpServletResponseWrapper {

	private HttpServletResponse response;
	private Base64ServletOutputStream bsos=new Base64ServletOutputStream();
	public Base64ResponseWrapper(HttpServletResponse response) {
		super(response);
		this.response=response;
		// TODO Auto-generated constructor stub
	}

	@Override
	public ServletOutputStream getOutputStream() throws IOException {
		// TODO Auto-generated method stub
		ServletOutputStream sos=response.getOutputStream();
		System.out.println("base64wrapper");
		bsos.setSos(sos);
		return bsos;
	}
}
